#!/usr/bin/env bash
#

target_dir="/Users/wangchao9/projects/game/jx/jx-editor/app/src/main/java/wx/xml/xalan"

#grep -E ".*java:\d+" ./build.log | sed  -E "s#${target_dir}/##g" | sed -E "s#.java.*##g"|sort -u|xargs -n1 ./cp_from_xalan.sh

grep -E "import" build.log | sed 's#import wx.xml.xalan.##g' |sed 's#;##g' |sort -u | xargs -n1 ./cp_from_xalan.sh

# grep -o -E "(public|private|protected)?\s+[A-Z]\w+\s+" build.log  \
# | sed 's/private//g' \
# | sed 's/public//g' \
# | sed 's/protected//g' \
# | sed 's/ //g' \
# | sed 's/What//g' \
# | sed 's/Run//g' \
# | sed 's/FAILED//g' \
# | sed 's/Get//g' \
# | sed 's/Build//g' \
# | sed 's/String//g' \
# | sed 's/Skipping//g' \
# | sort -u | xargs -n1 ./cp_from_xalan.sh

grep -E "符号:\s*类" build.log  \
| awk -F'类' '{print $2}' \
| sort -u \
| xargs -n1 ./cp_from_xalan.sh

grep -E "符号:\s*变量" build.log  \
| awk -F'变量' '{print $2}' \
| sort -u \
| xargs -n1 ./cp_from_xalan.sh
